Release 10.1A: OpenEdge Getting Started:
Database Essentials
After-image information
The after-image file is used to enable recovery to the last transaction or to a point in time in the case of media loss. After-imaging is critical for a comprehensive recovery strategy.
The after-image file is like the before-image file in the sequential nature of its access. It does not have automatic reuse like the before-image file because it requires intervention from the administrator to reuse space. After-imaging is the only way to recover a database to the present time in the case of a media failure (disk crash). It also provides protection from logical corruption by its “point-in-time” recovery ability.
For example, assume a program accidentally runs and incorrectly updates every customer name to “Frank Smith.” If you have mirroring, you now have two copies of bad data. With after-imaging, you can restore last night’s backup and roll forward today’s after-image files to a point in time just prior to running the program. After-image should be a part of every high-availability environment. For more details on implementing and managing after-image files, see OpenEdge Data Management: Database Administration .
Always use multi-volume extents
OpenEdge supports one or more after-image extents per database when after-imaging is enabled. Each extent of the after-image file is its own area with a unique area number, but it is more common to refer to them as extents. You need more than one extent for each after-image file to support a high-availability environment.
Each extent has five possible states: empty, busy, full, locked, or archived:
- An empty extent is empty and ready for use.
- A busy extent is one that is currently active. There can be only one busy extent per database.
- A full extent is a closed extent that contains notes and cannot be written to until the extent is marked as empty and readied for reuse by the database administrator.
- A locked extent is a full extent that has not been replicated by Fathom Replication. You will only see this state when you have Fathom Replication enabled.
- An archived extent is a full extent that has been archived by the AI File Management Utility, but has not been replicated by Fathom Replication. You will only see this state when you have enabled the AI File Management Utility and Fathom Replication.
Multiple extents allow you to support an online backup of your database. When an online backup is executed the following occurs:
- A latch is established in shared memory to ensure that no update activities take place.
- The modified buffers in memory are written (pseudo-checkpoint).
- An after-image extent switch occurs (if applicable).
- The busy after-image extent is marked as full, and the next empty extent becomes the busy extent.
- The primary recovery area is backed up.
- The latch that was established at the start of the process is released.
- The database blocks are backed up until complete.
Isolate for disaster recovery
The after-image files must be isolated to provide maximum protection from media loss. If you lose a database or before-image drive, you can replace the drive, restore your backup, and use the after-image file to restore your database. If you lose an after-image drive, you can disable after-imaging and restart the database. You will only lose active transactions if the after-image extents are isolated from the rest of the database. Sometimes this is difficult to do because you might have several file systems accessing the same physical drive, but the isolation must be at the device and file system levels.
Sizing after-image extents
The after-image area differs from all other areas because each extent can be either fixed or variable length. Each extent is treated as its own area. It is fairly common for people to define several (more than 10) variable-length extents for the after-imaging.
To choose a size, you must know how much activity occurs per day and how often you intend to switch after-image extents. You can define all of your extents as variable length and see how large they grow while running your application between switches. To accommodate above normal activity, you need extra extents. If you are concerned about performance, you would want to have the after-image extents fixed length so you are always writing to preformatted space. Preformatting allows you to gain:
Most operating systems are fairly good at eliminating disk fragmentation. However, if you have several files actively extending on the same file system, there is a high risk of fragmentation.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |